docs: explicitly document that @dispatch must be the inner decorator#254
Open
docs: explicitly document that @dispatch must be the inner decorator#254
@dispatch must be the inner decorator#254Conversation
…xample Co-authored-by: nstarman <8949649+nstarman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update documentation to clarify @dispatch as inner decorator
docs: explicitly document that Feb 19, 2026
@dispatch must be the inner decorator
Pull Request Test Coverage Report for Build 22192585753Details
💛 - Coveralls |
nstarman
reviewed
Feb 19, 2026
There was a problem hiding this comment.
Pull request overview
This PR improves the documentation in docs/classes.md to explicitly state that @dispatch must be the inner decorator when combined with other decorators. The documentation previously showed this pattern implicitly in examples but never explicitly stated it as a requirement, which could lead to confusing errors for users.
Changes:
- Added explicit statement that
@dispatchshould generally be the inner decorator when combined with other decorators - Added a new example demonstrating the correct decorator ordering with
@staticmethod - Provided example output showing the expected behavior
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
nstarman
approved these changes
Feb 19, 2026
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
nstarman
reviewed
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users combining
@dispatchwith decorators like@staticmethodmay encounter confusing errors if the decorator order is wrong. The docs previously showed@dispatchas an inner decorator without ever stating this is a requirement.fixes #201
Changes
docs/classes.md: Updated the "Decorators" section to explicitly state that@dispatchmust always be the inner decorator (closest to the function definition), and added a@staticmethodexample illustrating the correct ordering:Placing
@dispatchouter (e.g.@dispatchabove@staticmethod) breaks dispatch silently; the rule is now called out explicitly.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.